package com.service;

import com.service.form.DcsiteForm;
import com.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(value = "site", contextId = "dcSiteApiService")
public interface DcsiteApiService {


    @GetMapping("findAllDcSiteByPageAndOperatingState")
    Result findAllDcSiteByPageAndOperatingState(@RequestParam("operatingState") String operatingState,
                                                @RequestParam("current") Integer current,
                                                @RequestParam("pageSize") Integer pageSize);

    @PostMapping("addDcSite")
    Result addDcSite(@RequestBody DcsiteForm dcsiteForm);

    @PostMapping("setDcSiteOfOperatingStateByDcSiteNumber")
    Result setDcSiteOfOperatingStateByDcSiteNumber(@RequestParam("dcSiteNumber") String dcSiteNumber,
                                                   @RequestParam("operatingState") String operatingState);

    @GetMapping("getFranchiseInformationByVisitStateAndSiteType")
    Result getFranchiseInformationByVisitStateAndSiteType(@RequestParam("visitState") String visitState,
                                                          @RequestParam("siteType") String siteType,
                                                          @RequestParam("current") Integer current,
                                                          @RequestParam("pageSize") Integer pageSize);

    @PostMapping("setFranchiseInformationByVisitId")
    Result setFranchiseInformationByVisitId(@RequestParam("visitState") String visitState,
                                            @RequestParam("assess") String assess,
                                            @RequestParam("visitId") Integer visitId);
}
